import 'package:flutter/material.dart';
import 'package:interview/components/page/page_load.dart';
import 'package:webview_flutter/webview_flutter.dart';

class QuestionAnswer extends StatelessWidget {
  final bool isHtmlLoaded;
  final WebViewController controller;

  const QuestionAnswer({
    required this.isHtmlLoaded,
    required this.controller,
    Key? key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Expanded(
      child: Column(
        mainAxisAlignment: MainAxisAlignment.start,
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Text("答案：", style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold)),
          Expanded(
            child: isHtmlLoaded ?  WebViewWidget(controller: controller):PageLoad(width: 2),
          ),
        ],
      ),
    );
  }
}
